export const mathjaxstyleid = "MJX-CHTML-styles";
export async function rendercodeormath(
    stylecssrules: Set<string>,
    codeelements: {
        code: HTMLElement;
        pre: HTMLElement | null;
    }[]
    // url: string
) {
    const { default: highlightcodeormath } = await import(
        "./highlightcodeormath"
    );

    for (let element of codeelements) {
        await highlightcodeormath(
            element.code,
            element.pre,

            stylecssrules
        );
    }

    document.getElementById(mathjaxstyleid)?.remove();
}
